/*
 * gpio.h
 *
 *  Created on: Feb 8, 2013
 *      Author: bfakhri
 */

#ifndef GPIO_H_
#define GPIO_H_


#endif /* GPIO_H_ */
#include "support_common.h"

//Accesses the SETDD register and returns the state of pin p_pin (0 or 1).
int gpio_port_dd_get_pin_state(int p_pin);

//Configures PDDPAR and DDRDD so pin p_pin of port DD is in GPIO function and the
//pin data direction is input.
void gpio_port_dd_init(); 

//Accesses the SETTC register and returns the state of pin p_pin (0 or 1).
int gpio_port_tc_get_pin_state(int p_pin); 

//Configures PTCPAR and DDRTC so port TC is in GPIO function and the pin data
//direction is output.
void gpio_port_tc_init(); 

//Accesses the SETTC register to set the state of pin p_pin to p_state.
void gpio_port_tc_set_pin_state(int p_pin ,int p_state); 
